#include <iostream>
#include "Udp_Server.hpp"
#include "Route.hpp"
#include <memory>
#include <functional>
using namespace LOGSpace;
int main()
{
    // 本地环回127.0.0.1--本机ip地址   云服务器最好bind ip = 0
    uint16_t port = 8888;
    LOGTOSCREEN();
    Route messageRoute;
    servers_t message_func = std::bind(&Route::Forward, &messageRoute,
                                    std::placeholders::_1,
                                    std::placeholders::_2, std::placeholders::_3);
    std::unique_ptr<UdpServer> _ups = std::make_unique<UdpServer>(message_func,port);
    _ups->InitServer();
    _ups->StartServer();
    return 0;
}